package main
import (
	"fmt"
	"time"
)



func main() {
	//loc, _ := time.LoadLocation("Local") 
	formatTime, _ := time.Parse("2006-01-02 15:04:05", "2020-10-12 11:29:01")
	
	fmt.Println(" >>>>>>>> ",formatTime)
	days := subDays(time.Now(), formatTime)
	fmt.Println(" >>>>>>>> ",days)

	var f64 float64 = 10 
	msg := fmt.Sprintf("购买%fT算力",f64)
	
	fmt.Println(" >>>>>>>> ",msg)
	fmt.Println(" end ")
}



// 计算日期相差多少天
func subDays(t1, t2 time.Time) (day int) {
	day = int(t1.Sub(t2).Hours() / 24)
	return
}